import json
import os


class OperationJson:
    @staticmethod
    def build_data(filepath):
        # 打开json文件
        with open(filepath, mode='r', encoding='utf-8') as f:
            # 读取json文件
            json_data = json.load(f)
        return json_data


if __name__ == '__main__':
    filepath = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data/login_data.json")
    print(filepath)
    print(OperationJson.build_data(filepath))
